{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "suitable-monster",
   "metadata": {},
   "source": [
    "# `create_diff_report()`: generate comparison report for multiple dataframes"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "corresponding-slide",
   "metadata": {},
   "source": [
    "## Overview"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "empirical-browser",
   "metadata": {},
   "source": [
    "The function create_diff_report() allows users to generate a statistical report similar to the create_report() function.\n",
    "\n",
    "The function accepts either a list of Pandas dataframes, or a dictionary of Pandas dataframes with string keys as labels. Let's take a look."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "detailed-patch",
   "metadata": {},
   "source": [
    "## Loading the dataset"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "gentle-indian",
   "metadata": {},
   "outputs": [],
   "source": [
    "from dataprep.datasets import load_dataset\n",
    "df_train, df_test = load_dataset('house_prices_train'), load_dataset('house_prices_test')"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "proprietary-sensitivity",
   "metadata": {},
   "source": [
    "## Generate the report"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "hindu-jaguar",
   "metadata": {},
   "outputs": [],
   "source": [
    "from dataprep.eda import create_diff_report\n",
    "report = create_diff_report([df_train, df_test])"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "tough-server",
   "metadata": {},
   "source": [
    "Or sometimes we want to give specific labels to our dataframes"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "absent-version",
   "metadata": {},
   "outputs": [],
   "source": [
    "create_diff_report({\"df_train\": df_train, \"df_test\": df_test})"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
